#include <iostream>
using namespace std;

int main()
{
    // char str[] = "hello nowcoder";
    // char str[] = "XSUWHQ";
    char str[] = "ABSIB T";
    uint16_t count = 0; 
    for (char *p = str; *p != '\0'; p++)
    {
        if(*p != ' '){
            count++;
        }
        else{
            count = 0;
        }
    }
    
    cout << count << endl;
    
    return 0;
}